package com.ruoyi.back.service.impl;

import java.util.List;

import com.ruoyi.back.domain.UserH;
import com.ruoyi.back.mapper.UserHMapper;
import com.ruoyi.back.service.IUserHService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 用户Service业务层处理
 *
 * @author ruoyi
 * @date 2022-09-23
 */
@Service
public class UserHServiceImpl implements IUserHService
{
    @Autowired
    private UserHMapper userHMapper;

    /**
     * 查询用户
     *
     * @param userId 用户主键
     * @return 用户
     */
    @Override
    public UserH selectUserHByUserId(Long userId)
    {
        return userHMapper.selectUserHByUserId(userId);
    }

    /**
     * 查询用户列表
     *
     * @param userH 用户
     * @return 用户
     */
    @Override
    public List<UserH> selectUserHList(UserH userH)
    {
        return userHMapper.selectUserHList(userH);
    }

    /**
     * 新增用户
     *
     * @param userH 用户
     * @return 结果
     */
    @Override
    public int insertUserH(UserH userH)
    {
        return userHMapper.insertUserH(userH);
    }

    /**
     * 修改用户
     *
     * @param userH 用户
     * @return 结果
     */
    @Override
    public int updateUserH(UserH userH)
    {
        return userHMapper.updateUserH(userH);
    }

    /**
     * 批量删除用户
     *
     * @param userIds 需要删除的用户主键
     * @return 结果
     */
    @Override
    public int deleteUserHByUserIds(Long[] userIds)
    {
        return userHMapper.deleteUserHByUserIds(userIds);
    }

    /**
     * 删除用户信息
     *
     * @param userId 用户主键
     * @return 结果
     */
    @Override
    public int deleteUserHByUserId(Long userId)
    {
        return userHMapper.deleteUserHByUserId(userId);
    }


    @Override
    public int stopUserH(Long userId) {
        int i = userHMapper.stopUserH(userId);
        return i;
    }
}
